Returns the population variance of data, a non-empty iterable of real-valued numbers. Variance, or second moment about the mean, is a measure of the variability (spread or dispersion) of data. A large variance indicates that the data is spread out; a small variance indicates it is clustered closely around the mean.
+stddev
+------
+Syntax:
+
+ stddev([ts])
+
+Returns a float value.
+
+Returns the standard deviation which is the square root of its variance.
+
difference
----------
Syntax:
DATA['aggr'][-1][0],
sum([x[1] for x in DATA['aggr']]) / len(DATA['aggr'])]]})
+ self.assertAlmostEqual(
+ await self.client0.query('select stddev() from "aggr"'),
+ {'aggr': [[
+ DATA['aggr'][-1][0],
+ 147.07108914792838]]})
+
+ self.assertAlmostEqual(
+ await self.client0.query('select stddev(1h) from "aggr"'),
+ {"aggr": [
+ [1447250400, 1.8165902124584952],
+ [1447254000, 185.46409846162092],
+ [1447257600, 2.6457513110645907]]})
+
+
# test prefix, suffex
result = await self.client0.query(
'select sum(1d) prefix "sum-" suffix "-sum", '